package com.apes.scm.masterdata.party.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.Name;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 功能：角色类型
 *
 * @author xul
 * @create 2018-01-23 14:35
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = "mas_role")
public class RoleType extends Model {

    @Id
    @Column(name = "ID", length = 20)
    private String id; //角色ID

    @Name
    @Column(name = "NAME", nullable = false, length = 80)
    private String name; //角色ID

}
